package com.wuzheng.wisgo.sanitation.cloud.service.facility;

import com.wuzheng.wisgo.sanitation.cloud.model.facility.param.FacilityDetailParam;
import com.wuzheng.wisgo.sanitation.cloud.model.facility.param.FacilityListParam;
import com.wuzheng.wisgo.sanitation.cloud.model.facility.param.TrashStateParam;
import com.wuzheng.wisgo.sanitation.cloud.model.facility.pojo.FacilityDTO;
import com.wuzheng.wisgo.sanitation.cloud.model.facility.pojo.TrashStateDTO;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.facility.Facility;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.person.User;
import com.wuzheng.wisgo.sanitation.framework.base.service.BaseService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author：hoipang
 * @date：Created in 2019-12-03
 * @description：环卫设施信息服务类
 * @modified By：
 * @version: 1.0
 */
public interface FacilityService extends BaseService<Facility> {

    /**
     * 查询环卫设施特定信息列表(支持分页)
     * @param facilityListParam
     * @return
     */
    List<FacilityDTO> listFacilityDTOs(FacilityListParam facilityListParam);

    /**
     * 根据条件查询地图上所有垃圾桶状态
     * @return
     */
    List<TrashStateDTO> listTrashStateDTOs(TrashStateParam trashStateParam);

    /**
     * 批量删除环卫设施信息
     * @param list
     */
    void removeFacilities(List<String> list);

    /**
     * 查询环卫设施特定信息
     * @param id
     * @return
     */
    FacilityDTO selectFacilityDTO(String id);

    /**
     * 增加或更新设施信息
     * @param facilityDetailParam
     * @return
     */
    @Transactional
    FacilityDTO insertOrUpdate(User user, FacilityDetailParam facilityDetailParam);
}
